import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let instance: any = null
const render = () => {
  instance = new Vue({
    router,
    store,
    render: h => h(App)
  }).$mount('#app')
}

if (!window.__MICRO_WEB__) {
  render()
}
// 下面微前端框架进行控制

// 开始加载结构
export const bootStrap = () => {
  console.log('开始加载')
}
// 渲染成功
export const mount = () => {
  render()
  console.log('渲染成功')
}
// 卸载
export const unmount = () => {
  console.log('卸载', instance)
}
